package guo.tts.domain;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import guo.tts.dbutil.ResultSetHandler;

public class User2List implements ResultSetHandler<List<User>>{

	@Override
	public List<User> handler(ResultSet rs) {
		List<User> list=new ArrayList<>();
		try {
			while(rs.next()) {
				User user=new User(rs.getInt(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getString(5),rs.getString(6));
			    list.add(user);
			}
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return list;
	}

}

